package com.controller;

import com.dto.BaseDto;
import com.entity.Chart;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import  com.service.ChartService;

import javax.annotation.Resource;
import java.util.List;


@RestController
@RequestMapping("/chartController")
public class ChartController {
    @Resource
    ChartService chartService;

    @RequestMapping("/charts/{chartName}")
    public BaseDto getCharts(@PathVariable("chartName") String chartName){
       return chartService.getCharts(chartName);
    }
}
